import { lazy } from "react"
import { PATHTYPE } from "../types/router.d";
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
export let homePath: PATHTYPE[] = [
    {
        path: "/home/index",
        name: "Index",
        component: lazy(() => import("../views/home/index/Index")),
        title: "首页",
        icon: HomeO
    },
    {
        path: "/home/classify",
        name: "Classify",
        component: lazy(() => import("../views/home/classify/Classify")),
        title: "分类",
        icon: Search
    },
    {
        path: "/home/shopcar",
        name: "Shopcar",
        component: lazy(() => import("../views/home/shopcar/Shopcar")),
        title: "购物车",
        icon: SettingO
    },
    {
        path: "/home/my",
        name: "My",
        component: lazy(() => import("../views/home/my/My")),
        title: "我的",
        icon: FriendsO
    },
    {
        path: "/home",
        to: "/home/index"
    },
]
let routes = [
    {
        path: "/home",
        name: "Home",
        component: lazy(() => import("../views/home/Home")),
        children: homePath
    },
    {
        path: "/login",
        name: "Login",
        component: lazy(() => import("../views/login/Login")),
    },
    {
        path: "/detail",
        name: "Detail",
        component: lazy(() => import("../views/detail/Detail")),
    },
    {
        path: "/",
        to: "/home"
    },
]
export default routes